package xsxdjc
public class AbtestSimple{
	static public class ClasOption implements hc.bre.cmn.IListOption{
		int id;
		String code;
		String name;
	};
	public static final ClasOption low = new ClasOption(id:3, code:'low', name:null);
	public static final ClasOption high = new ClasOption(id:1, code:'high', name:null);
	public static final ClasOption superhigh = new ClasOption(id:2, code:'superhigh', name:null);
	public static final ClasOption other = new ClasOption(id:0, code:'other', name:'其它');
	public static Closure rule = {_context_ ->
		hc.bre.clas.ClasResult _result_ = new hc.bre.clas.ClasResult();
		_result_.rname = 'AbtestSimple';
		_result_.rpath = 'xsxdjc/AbtestSimple';
		
		switch(((int)(Math.random()*9999) % 1000)){
			case 0..100 :
				_result_.clas = AbtestSimple.low;
				break;
			case 101..500 :
				_result_.clas = AbtestSimple.high;
				break;
			case 501..900 :
				_result_.clas = AbtestSimple.superhigh;
				break;
			default :
				_result_.clas = AbtestSimple.other;
				break;
		};
		
		return _result_;
	};
};